using System;

namespace Model
{
	/// <summary>
	/// Summary description for CreditCard.
	/// </summary>
	[Serializable]
	public class CreditCard : ExternalAccount
	{
		private decimal creditLimit; // Use the Set Method to set the limit.
		
		public decimal CreditLimit
		{
			get
			{
				return creditLimit;
			}
			set
			{
				creditLimit = value;
			}
		}



		public CreditCard(string iniAccountName, string iniOwner,decimal limit) : base( iniAccountName,  iniOwner,0)

		{
			creditLimit=limit;
		}

		/// <summary>
		/// Finds out if the balance is nearing the credit limit
		/// </summary>
		/// <returns>true if the balance is within a threshold percentage of the limit</returns>
		public bool isNearingLimit()
		{
			return true;// TODO: stub
		}

		/// <summary>
		/// Finds out if the amount is over the credit limit
		/// </summary>
		/// <returns></returns>
		public bool isOverLimit()
		{
			return true; // TODO: stub
		}

		/// <summary>
		/// The money left in the balance before it goes over limit.
		/// </summary>
		/// <returns>positive if under limit, negative if over</returns>
		public decimal amountLeftUntilLimit()
		{
			return 0; // TODO: stub
		}
	}
}
